package com.example;

import java.util.Scanner;

public class Demo02 {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入一个正整数：");
        if (scanner.hasNext()) {
            int a = scanner.nextInt();
            /* + 前后有字符串，结果就是字符串的拼接*/
            System.out.println("您输入的数字是：" + a);
        }
    }
}
